# 读取a.log和b.log两个日志文件
# 将两个日志文件合并，同时去除重复的日志
# 遍历输出日志
with open('logs/a.log', mode='r') as fr1:
    alist = fr1.readlines()
with open('logs/b.log', mode='r') as fr2:
    blist = fr2.readlines()
# print(alist, blist)
# 将列表转为集合
aset = set(alist)
bset = set(blist)
# 求并集
all = aset | bset
# print(all)
all = list(all)
all.sort()
# 把集合转为列表，遍历得到每一行
for line in all:
    print(line, end='')



